#ifndef BASELINE_BAGGING_H__CMU_
#define BASELINE_BAGGING_H__CMU_

#include "boosting_algorithm.h"

class baseline_bagging : public boosting_algorithm {
public:
	virtual void initialize_distribution(double * d, double * y, int l);
	virtual double get_alpha(double * y, double * p, double * d, int l);
	virtual void update_distribution(double alpha, double * y, double * p, int l, double * d_t, double * d_t1);
	virtual double predict(double * alpha, double * p, int n);
	virtual bool full_updating();
	virtual string get_type();
protected:
	virtual void normalize(double * d, int l);
	virtual void gradual_update_distribution(double * y, double * p, int l, double * d_t, double * d_t1);
};

class baseline_gradual_bagging : public baseline_bagging {
public:
	virtual void update_distribution(double alpha, double * y, double * p, int l, double * d_t, double * d_t1);
	virtual bool full_updating(){return false;}
	virtual string get_type();
};

#endif